Skip to content

gh-142440: apply context to x, not v, in _decimal_Context_apply_impl#142441

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
AZero13:typo
Jan 19, 2026
Merged

gh-142440: apply context to x, not v, in _decimal_Context_apply_impl#142441
serhiy-storchaka merged 2 commits into
python:mainfrom
AZero13:typo

Conversation

@AZero13

@AZero13 AZero13 commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

@skirpichev skirpichev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's a typo, introduced by ef4dd1d.

@AZero13

AZero13 commented Jan 19, 2026

Copy link
Copy Markdown
Contributor Author

Any update on this?

@serhiy-storchaka serhiy-storchaka merged commit 7dca4e3 into python:main Jan 19, 2026
46 checks passed
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label Jan 19, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @AZero13 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @AZero13 and @serhiy-storchaka, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 7dca4e3af118328d7013b58106d129b162047cb3 3.14

@serhiy-storchaka serhiy-storchaka removed the needs backport to 3.14 bugs and security fixes label Jan 19, 2026
@serhiy-storchaka serhiy-storchaka removed their assignment Jan 19, 2026
@AZero13 AZero13 deleted the typo branch January 19, 2026 15:12
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
@weixlu

weixlu commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Hi everyone,

I ran into a compile error near the changes in this PR.

./Modules/_decimal/_decimal.c:6996:12: error: too few arguments to function '_decimal_Context__apply'
 6996 |     return _decimal_Context__apply(context, x);
      |            ^~~~~~~~~~~~~~~~~~~~~~~

I think the issue goes beyond a typo: the wrapper is calling the wrong function. It should call _decimal_Context__apply_impl(context, cls, x) instead of _decimal_Context__apply(context, x).

After making that change, I was able to build successfully and run the decimal tests.

@skirpichev @serhiy-storchaka Would this fix be acceptable? If so, I’m happy to open a PR.

Thanks!

update: I have opened a PR #152871, please have a look, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants